# -*- coding:utf-8 -*-

import mitmproxy.http
from mitmproxy import ctx, http


class Joker:
    def request(self, flow: mitmproxy.http.HTTPFlow):
        # if flow.request.host != "test-erp.hkitcloud.net":
            # return
        # ctx.log.info(flow.request.headers.get())
        # flow.request.query.set_all("wd", ["360搜索"])
        pass

    def response(self, flow: mitmproxy.http.HTTPFlow):
        # text = flow.response.get_text()
        pass

    def http_connect(self, flow: mitmproxy.http.HTTPFlow):
        # if flow.request.host == "www.google.com":
            # flow.response = http.HTTPResponse.make(404)
        pass
